<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>数据字典分类新增</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/common/component/jquery-easyui-1.3.1/themes/gray/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/common/component/jquery-easyui-1.3.1/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/common/component/jquery/jquery-1.7.1.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/common/component/jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/common/component/jquery-easyui-1.3.1/src/jquery.parser.js"></script>
<style type="text/css">
	
	body {
		margin: 0;
		font-size: 12px;
	}
	
</style>
</head>
<body>

	<div style="background:#fafafa;padding:2px;border:1px solid #ddd">
	    <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-save'" onclick="save()">确定</a>
	</div>
	<div style="text-align: center;margin-top:20px;">
		数据字典分类名：<input type="text" id="moduleName" name="moduleName"/>
	</div>

</body>
<script type="text/javascript">
	
	function save() {
		if(!$("#moduleName").val()) {
			return;
		}
		$.post("dict.action.jsp", {action:"addDictModule",name:$("#moduleName").val()}, function(data){
			if($.trim(data) == "success") {
				window.parent.loadDictModule();
				window.parent.ymPrompt.close();
			} else {
				alert("添加错误");
			}
		});
	}
	
</script>
</html>